<template>
	<u-popup v-model="popupShow" mode="center" border-radius="16" width="516rpx" height="472rpx" :negative-top="720" :mask-close-able="false">
			<view class="popup">
				<view class="title_p">
					{{title}}
				</view>
				<view class="content">
					<u-input v-model="content" type="textarea" :auto-height="false"  :border="false" :height="168" :custom-style="customstyle" :clearable="fal" :placeholder="placeholder"/>
					<view class="foot54">
						<view class="btn1" @click.stop="cancel">
							取消
						</view>
						<view class="btn2" @click.stop="sure">
							{{sureStr}}
						</view>
					</view>
				</view>
			</view>
		</u-popup>
</template>

<script>
	export default{
		props: {
			popupShow: {
				type: Boolean,
				default: false,
				required: true
			},
			title: {
				type: String,
				default: false,
				required: true
			},
			placeholder: {
				type: String,
				default: false,
				required: true
			},
			sureStr: {
				type: String,
				default: false,
				required: true
			}
		},
		data(){
			return{
				content:'',
				customstyle:{
					width: '430rpx',
					height: '168rpx',
					background: '#f6f6f6',
					borderRadius: '16rpx',
					padding:'16rpx',
					color: '#333333',
					fontSize: '28rpx'
				}
			}
		},
		methods:{
			cancel(){
				this.$emit('cancel')
			},
			sure(){
				this.$emit('sure', this.content)
				this.content = ''
			}
		}
	}
</script>

<style lang="scss">
	.popup{
		width: 516rpx;
		height: 472rpx;
		background: #ffffff;
		border-radius: 16rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		.title_p{
			width: 516rpx;
			height: 92rpx;
			background: #f6f6f6;
			border-radius: 16rpx 16rpx 0rpx 0rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 32rpx;
			font-family: PingFang SC, PingFang SC-Bold;
			font-weight: 700;
			text-align: center;
			color: #000000;
		}
		.content{
			width: 100%;
			height: 348rpx;
			display: flex;
			flex-direction: column;
			align-items: center;
			padding-top: 40rpx;
			.foot54{
				width: 100%;
				padding-top: 40rpx;
				display: flex;
				flex-direction: row;
				justify-content: space-around;
				.btn1{
					width: 198rpx;
					height: 68rpx;
					background: #f6f6f6;
					border-radius: 16rpx;
					font-size: 28rpx;
					font-family: PingFang SC, PingFang SC-Medium;
					font-weight: 500;
					text-align: center;
					color: #000000;
					display: flex;
					align-items: center;
					justify-content: center;
				}
				.btn2{
					width: 198rpx;
					height: 68rpx;
					background: #73F0EA;
					border-radius: 16rpx;
					font-size: 28rpx;
					font-family: PingFang SC, PingFang SC-Medium;
					font-weight: 500;
					text-align: center;
					color: #ffffff;
					display: flex;
					align-items: center;
					justify-content: center;
				}
			}
		}
	}
</style>